package o;

import java.util.ArrayList;
import o.el.c;

public class ej extends et {
    private ArrayList<ev> ʻˊ = new ArrayList(4);
    private int ʻˋ = 0;
    private boolean ʼˋ = true;

    public boolean ॱ() {
        return true;
    }

    public void ˊ(int i) {
        this.ʻˋ = i;
    }

    public void ˏ(boolean z) {
        this.ʼˋ = z;
    }

    public boolean ˋ() {
        return this.ʼˋ;
    }

    public void ˊ() {
        super.ˊ();
        this.ʻˊ.clear();
    }

    public void ˋ(int i) {
        if (this.ˊˋ != null && ((ek) this.ˊˋ).ʼॱ(2)) {
            eu ˎ;
            switch (this.ʻˋ) {
                case 0:
                    ˎ = this.ᐝॱ.ˎ();
                    break;
                case 1:
                    ˎ = this.ʼॱ.ˎ();
                    break;
                case 2:
                    ˎ = this.ʻॱ.ˎ();
                    break;
                case 3:
                    ˎ = this.ʽॱ.ˎ();
                    break;
                default:
                    return;
            }
            ˎ.ˊ(5);
            if (this.ʻˋ == 0 || this.ʻˋ == 1) {
                this.ʻॱ.ˎ().ˋ(null, 0.0f);
                this.ʽॱ.ˎ().ˋ(null, 0.0f);
            } else {
                this.ᐝॱ.ˎ().ˋ(null, 0.0f);
                this.ʼॱ.ˎ().ˋ(null, 0.0f);
            }
            this.ʻˊ.clear();
            for (int i2 = 0; i2 < this.ʼˊ; i2++) {
                el elVar = this.ʻᐝ[i2];
                if (this.ʼˋ || elVar.ॱ()) {
                    ev ˎ2;
                    switch (this.ʻˋ) {
                        case 0:
                            ˎ2 = elVar.ᐝॱ.ˎ();
                            break;
                        case 1:
                            ˎ2 = elVar.ʼॱ.ˎ();
                            break;
                        case 2:
                            ˎ2 = elVar.ʻॱ.ˎ();
                            break;
                        case 3:
                            ˎ2 = elVar.ʽॱ.ˎ();
                            break;
                        default:
                            ˎ2 = null;
                            break;
                    }
                    if (ˎ2 != null) {
                        this.ʻˊ.add(ˎ2);
                        ˎ2.ॱ(ˎ);
                    }
                }
            }
        }
    }

    public void ˏ() {
        ev ˎ;
        float f = Float.MAX_VALUE;
        switch (this.ʻˋ) {
            case 0:
                ˎ = this.ᐝॱ.ˎ();
                break;
            case 1:
                ˎ = this.ʼॱ.ˎ();
                f = 0.0f;
                break;
            case 2:
                ˎ = this.ʻॱ.ˎ();
                break;
            case 3:
                ˎ = this.ʽॱ.ˎ();
                f = 0.0f;
                break;
            default:
                return;
        }
        int size = this.ʻˊ.size();
        int i = 0;
        ev evVar = null;
        float f2 = f;
        while (i < size) {
            ev evVar2 = (ev) this.ʻˊ.get(i);
            if (evVar2.ᐝ == 1) {
                float f3;
                if (this.ʻˋ == 0 || this.ʻˋ == 2) {
                    if (evVar2.ʼ < f2) {
                        f3 = evVar2.ʼ;
                        evVar2 = evVar2.ˊ;
                    }
                    evVar2 = evVar;
                    f3 = f2;
                } else {
                    if (evVar2.ʼ > f2) {
                        f3 = evVar2.ʼ;
                        evVar2 = evVar2.ˊ;
                    }
                    evVar2 = evVar;
                    f3 = f2;
                }
                i++;
                f2 = f3;
                evVar = evVar2;
            } else {
                return;
            }
        }
        if (ea.ˏ() != null) {
            ei ˏ = ea.ˏ();
            ˏ.ˊˊ++;
        }
        ˎ.ˊ = evVar;
        ˎ.ʼ = f2;
        ˎ.ʻ();
        switch (this.ʻˋ) {
            case 0:
                this.ʼॱ.ˎ().ˋ(evVar, f2);
                return;
            case 1:
                this.ᐝॱ.ˎ().ˋ(evVar, f2);
                return;
            case 2:
                this.ʽॱ.ˎ().ˋ(evVar, f2);
                return;
            case 3:
                this.ʻॱ.ˎ().ˋ(evVar, f2);
                return;
            default:
                return;
        }
    }

    public void ˏ(ea eaVar) {
        int i;
        this.ˋˊ[0] = this.ᐝॱ;
        this.ˋˊ[2] = this.ʻॱ;
        this.ˋˊ[1] = this.ʼॱ;
        this.ˋˊ[3] = this.ʽॱ;
        for (i = 0; i < this.ˋˊ.length; i++) {
            this.ˋˊ[i].ᐝ = eaVar.ˊ(this.ˋˊ[i]);
        }
        if (this.ʻˋ >= 0 && this.ʻˋ < 4) {
            boolean z;
            eo eoVar = this.ˋˊ[this.ʻˋ];
            for (i = 0; i < this.ʼˊ; i++) {
                el elVar = this.ʻᐝ[i];
                if (this.ʼˋ || elVar.ॱ()) {
                    if ((this.ʻˋ != 0 && this.ʻˋ != 1) || elVar.ˍ() != c.MATCH_CONSTRAINT) {
                        if ((this.ʻˋ == 2 || this.ʻˋ == 3) && elVar.ˌ() == c.MATCH_CONSTRAINT) {
                            z = true;
                            break;
                        }
                    }
                    z = true;
                    break;
                }
            }
            z = false;
            if (this.ʻˋ == 0 || this.ʻˋ == 1) {
                if (ॱˊ().ˍ() == c.WRAP_CONTENT) {
                    z = false;
                }
            } else if (ॱˊ().ˌ() == c.WRAP_CONTENT) {
                z = false;
            }
            for (int i2 = 0; i2 < this.ʼˊ; i2++) {
                el elVar2 = this.ʻᐝ[i2];
                if (this.ʼˋ || elVar2.ॱ()) {
                    eh ˊ = eaVar.ˊ(elVar2.ˋˊ[this.ʻˋ]);
                    elVar2.ˋˊ[this.ʻˋ].ᐝ = ˊ;
                    if (this.ʻˋ == 0 || this.ʻˋ == 2) {
                        eaVar.ˎ(eoVar.ᐝ, ˊ, z);
                    } else {
                        eaVar.ˏ(eoVar.ᐝ, ˊ, z);
                    }
                }
            }
            if (this.ʻˋ == 0) {
                eaVar.ˊ(this.ʼॱ.ᐝ, this.ᐝॱ.ᐝ, 0, 6);
                if (!z) {
                    eaVar.ˊ(this.ᐝॱ.ᐝ, this.ˊˋ.ʼॱ.ᐝ, 0, 5);
                }
            } else if (this.ʻˋ == 1) {
                eaVar.ˊ(this.ᐝॱ.ᐝ, this.ʼॱ.ᐝ, 0, 6);
                if (!z) {
                    eaVar.ˊ(this.ᐝॱ.ᐝ, this.ˊˋ.ᐝॱ.ᐝ, 0, 5);
                }
            } else if (this.ʻˋ == 2) {
                eaVar.ˊ(this.ʽॱ.ᐝ, this.ʻॱ.ᐝ, 0, 6);
                if (!z) {
                    eaVar.ˊ(this.ʻॱ.ᐝ, this.ˊˋ.ʽॱ.ᐝ, 0, 5);
                }
            } else if (this.ʻˋ == 3) {
                eaVar.ˊ(this.ʻॱ.ᐝ, this.ʽॱ.ᐝ, 0, 6);
                if (!z) {
                    eaVar.ˊ(this.ʻॱ.ᐝ, this.ˊˋ.ʻॱ.ᐝ, 0, 5);
                }
            }
        }
    }
}
